package com.qcdp.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
//我们要是用reids的客户端配置类
@Configuration
public class RedissonConfig {
    //配置redis分分布式锁的对象
    @Bean
    public RedissonClient redissonClient(){
        //配置我们redis的连接信息
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.56.105:6379").setPassword("123321");
        return Redisson.create(config);

    }
}
